package kr.hkit.powerjava.chapter22.collection;

import java.util.HashMap;
import java.util.Map;

public class WordFreq {
	public static void main(String[] args) {
		Map<Integer, Integer> m = new HashMap<>();
		
		int[] sample = {90, 95, 98, 81, 80, 55, 45, 20};
		
		for(int a : sample){
			Integer freq = m.get(a/10);
			m.put(a/10, (freq == null)? 1 : freq + 1);
		}
			
		System.out.println(m.size() + "점수대가 있습니다.");
		System.out.println(m.containsKey(7));
		System.out.println(m.isEmpty());
		System.out.println(m);
	}
}
